
//-----------------MATRICES---------------
float4x4 xWorld: World;				
float4x4 xView: View;
float4x4 xProjection: Projection;

	
//------------------- STRUCTS -------------------   


struct BufferToVertex
{
float3 Pos : POSITION;
};


struct VertexToPixel
{
float4 Pos:POSITION;
};


struct PixelToFrame
{
float4 Color:COLOR;
};





//---------------------- SHADERS ------------------------

VertexToPixel simplestVS(BufferToVertex IN)
{
  VertexToPixel OUT = (VertexToPixel)0;
  float4x4 WorldViewProj;
  
  WorldViewProj=mul(xWorld,xView);
  WorldViewProj=mul(WorldViewProj,xProjection);
  
  OUT.Pos=mul(float4(IN.Pos.xyz,1.0), WorldViewProj);
  return OUT;
}

PixelToFrame simplestPS(VertexToPixel IN) 
{
PixelToFrame OUT = (PixelToFrame)0;

OUT.Color = float4(1.0, 0.0, 0.0, 0.5);
return OUT;
}




// ------------ TECHNIQUES --------------

technique simplest{
	pass p0 {
		VertexShader = compile vs_3_0 simplestVS();
		PixelShader = compile ps_3_0 simplestPS();
	}
}


